package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_goods_exchange")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GoodsExchangeModel {
    @TableId(value="id",type= IdType.AUTO)
    private Integer id;
    private Integer userId;//用户id
    @TableField(exist = false)
    private String avatar;
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String phoneNumber;
    private Integer goodsId;//商品id
    @TableField(exist = false)
    private String goodsName;
    private Integer integral;
    private Integer num;//商品数量
    private Integer status;//核销状态 0待核销 1已核销
    @TableField(exist = false)
    private String statusText;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private String exchangeTime;//核销时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;
    @TableField(exist = false)
    private Integer bonusPoints;
    @TableField(exist = false)
    private String name;
    @TableField(exist = false)
    private Integer ranking;
    @TableField(exist = false)
    private String villageText;
}
